using System;
using System.Collections.Generic;
using System.Text;

namespace Pricom
{
  public delegate void UserlistChangedEventHandler(object sender, string channel, string url, string[] newUserlist);
  public delegate void TopicChangedEventHandler(object sender, string channel, string url, string newTopic, string changedBy);
  public delegate void MessageReceivedEventHandler(object sender, string from, string url, string message);
  public delegate void ConnectionChangedEventHandler(object sender, string url, string newUrl);

  public interface IConnectionProvider
  {
    void SetProxy(string proxyserver);
    void Connect(string server, int port, string nick);
    bool TestConnection();
    void Disconnect();

    void Command(string msg);
    void Send(string to, string msg);
    void Join(string channel);
    void Leave(string channel);

    bool IsConnected();
    string GetNickname();
    string GetTopic(string channel);

    event UserlistChangedEventHandler UserlistChanged;
    event TopicChangedEventHandler TopicChanged;
    event MessageReceivedEventHandler MessageReceived;
    event MessageReceivedEventHandler ActionMessageReceived;
    event ConnectionChangedEventHandler ConnectionChanged;
  }
}
